/**
 * 
 */
package com.org.javabody.MathApi.MathDecimal.AddBigDecimal;

import java.math.BigDecimal;

/**
 * @author Administrator
 *
 */
public class AddDecimalDemo {

	public static void add(String a, String b) {
		try {//add
			BigDecimal deci1 = new BigDecimal(a);
			BigDecimal deci2 = new BigDecimal(b);
			System.out.println(deci1.add(deci2));
		}catch(Exception e) {
			System.out.println(e);
		}
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
         add("2","5.77");
         add("a","5.77"); 
         add("0.2","0.77"); 
	}

}
